package com.lakeworks.service.impl;

import com.lakeworks.common.core.text.Convert;
import com.lakeworks.common.domain.ticket.TktRoute;
import com.lakeworks.mapper.TktRouteMapper;
import com.lakeworks.service.ITktRouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 流程路由信息Service业务层处理
 *
 * @author lake
 * @date 2023-07-17
 */
@Service
public class TktRouteServiceImpl implements ITktRouteService {
    @Autowired
    private TktRouteMapper tktRouteMapper;

    @Override
    public TktRoute selectTktRouteByIKey(String key) {
        return tktRouteMapper.selectTktRouteByIKey(key);
    }

    /**
     * 查询流程路由信息
     *
     * @param id 流程路由信息主键
     * @return 流程路由信息
     */
    @Override
    public TktRoute selectTktRouteById(Long id) {
        return tktRouteMapper.selectTktRouteById(id);
    }

    /**
     * 查询流程路由信息列表
     *
     * @param tktRoute 流程路由信息
     * @return 流程路由信息
     */
    @Override
    public List<TktRoute> selectTktRouteList(TktRoute tktRoute) {
        return tktRouteMapper.selectTktRouteList(tktRoute);
    }

    /**
     * 新增流程路由信息
     *
     * @param tktRoute 流程路由信息
     * @return 结果
     */
    @Override
    public int insertTktRoute(TktRoute tktRoute) {
        return tktRouteMapper.insertTktRoute(tktRoute);
    }

    /**
     * 修改流程路由信息
     *
     * @param tktRoute 流程路由信息
     * @return 结果
     */
    @Override
    public int updateTktRoute(TktRoute tktRoute) {
        return tktRouteMapper.updateTktRoute(tktRoute);
    }

    /**
     * 批量删除流程路由信息
     *
     * @param ids 需要删除的流程路由信息主键
     * @return 结果
     */
    @Override
    public int deleteTktRouteByIds(String ids) {
        return tktRouteMapper.deleteTktRouteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除流程路由信息信息
     *
     * @param id 流程路由信息主键
     * @return 结果
     */
    @Override
    public int deleteTktRouteById(Long id) {
        return tktRouteMapper.deleteTktRouteById(id);
    }
}
